function xcorrsummary()

global CONTROL

xc = strcmp({CONTROL.protocol}, 'spontcorrelation');
jc = find(xc == 1);
noq = 1;
fprintf(1, 'Found %d targets\n', length(jc));
for i = 1:length(jc)
    sf = jc(i);
    if(jc(i) > 0)
       rb = CONTROL(sf).recbeg;
       tfile = CONTROL(sf).filename;
       kc = jc(find(jc ~= 0));
       u = find([CONTROL(kc).recbeg] == rb & strcmp({CONTROL(kc).filename}, tfile));
       v = find([kc(u)] ~= sf);
       if(~isempty(v))
           w=[sf kc(u(v))];
           setmainselection(w);
            jc(i) = 0;
            setmainselection(w(1));
            CONTROL(w(1)).basechan = 1;
            spike_analysis(noq);
            setmainselection(w(2));
            CONTROL(w(2)).basechan = 3;
            spike_analysis(noq);
            setmainselection(w);
            spike_xcorr;
            stackplot;
            
       end;
    
    end;
end;
